package com.sykj.why.mongo.enums;

public class AuditStatusEnum {

    public enum ApplyStatus {
        PENDING_REVIEW("待审核", 1),
        PASS("通过", 2),
        NO_PASS("驳回", 3),
        CANCELLED("已取消", 4),
        END("已完结", 5);
        ;

        private String name;
        private int state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        ApplyStatus(String name, int state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(int tag) {
            for (ApplyStatus d : ApplyStatus.values()) {
                if (d.getState() == tag) {
                    return d.getName();
                }
            }
            return "";
        }

    }

}
